<%-- 
    Document   : listarUsuario
    Created on : 11/03/2008, 17:51:45
    Author     : Tom Hayden
--%>

<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<script type="text/javascript">
    
    function imprimir() {
        callPop("listarUsuarioReport.do?method=imprimir", "", 800, 600);
    }
    
</script>

<h1><fmt:message key="manterusuario.listagem.title"/></h1>
<input type="button" value="<fmt:message key="global.label.botaonovo"/>" onclick="goURL('manterUsuario.do?method=detalhar&acao=incluir');">
<input type="button" value="<fmt:message key="global.label.botaovoltar"/>" onclick="goURL('home.do');">
<input type="button" value="<fmt:message key="global.label.botaoimprimir"/>" onclick="imprimir();">
<br>
<br>
<c:if test="${not empty collection}">
    <table class="grid">
        <tr>
            <th><fmt:message key="manterusuario.field.description"/></th>
            <th><fmt:message key="manterusuario.field.login"/></th>
            <th><fmt:message key="manterusuario.field.perfil"/></th>
        </tr>
        <c:forEach var="item" items="${collection}">
            <tr>
                <td><a href="manterUsuario.do?method=detalhar&acao=alterar&id=${item.id}">${item.description}</a></td>
                <td>${item.login}</td>
                <td>${item.perfil.description}</td>
            </tr>
        </c:forEach>
    </table>
</c:if>